# -*- coding: utf-8 -*-
# @Time    : 2022/7/16 16:12
# @Author  : catherine
# @Email   : catherine_csq@163.com
# @File    : customer_pool_page.py
# @Software: PyCharm

from selenium.webdriver.common.by import By

from pages.base_page import BasePage


class CustomerPoolPage(BasePage):
    '''客户首页类'''
    url="http://192.168.189.1:8081/crm/index.php?m=customer&a=index&content=resource"
    #定位器
    assign_customer_locator = (By.LINK_TEXT, '分配')
    confirm_locator = (By.XPATH, '/html/body/div[10]/div[3]/div/button[1]')

    def click_assign_customer(self):
        '''分配第一个客户'''
        self.find_element(self.assign_customer_locator).click()

    def click_confirm_assign(self):
        '''确认分配客户'''
        self.find_element(self.confirm_locator).click()
